Fix IOAPIC S3 with interrupt remapping enabled
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Aug 2010 13:57:35 +0000 (14:57 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 13 Aug 2010 13:57:35 +0000 (14:57 +0100)
commit01420271f83ad1ef64194bb022954ee443995b34
tree96ee7360d74658000720e287f24a17cd5b517579
parent56b6043791a3bc00097836cc5f1d02bd56c472a5
Fix IOAPIC S3 with interrupt remapping enabled

In ioapic_suspend, it reads and saves ioapic RTEs. But when interrupt
remapping is enabled, io_apic_read will call io_apic_read_remap_rte to
convert remapped format interrupt to compatible format, this results
in 'dest' field may be changed in remap_entry_to_ioapic_rte. When in
ioapic_resume, it will write the saved RTEs with incorrect 'dest' to
interrupt remapping table.

Actually it needn't to convert RTEs regardless interrupt remapping is
enabled or not. It just needs to save and restore RTE values
directly. This patch just uses __io_apic_read and __io_apic_write,
which won't call Interrupt remapping functions to convert, to save and
restore RTEs in ioapic_suspend and ioapic_resume. Thus fix this issue.

Signed-off-by: Weidong Han <weidong.han@intel.com>
xen/arch/x86/io_apic.c